<template>
	<view class="content">

		<button class="btn" @click="goNext(dprop)">工作日历(周计划日报)</button>
		<button class="btn" @click="goNext(eprop)">周计划日报(不需要审核)</button>
		<button class="btn" @click="goNext(aprop)">工作日历(周计划)</button>
		<button class="btn" @click="goNext(bprop)">工作日历(日报)</button>
		<button class="btn" @click="goNext(cprop)">日历</button>

	</view>
</template>

<script lang="ts" setup>
	import { ref } from 'vue'
	import { onLoad } from '@dcloudio/uni-app'
	const selectListItem = ref([])
	const aprop = {
		showPlan: true,
		showDay: false,
		showMonth: false,
		needState: true
	}
	const bprop = {
		showPlan: false,
		showDay: true,
		showMonth: false,
		needState: true
	}
	const cprop = {
		showPlan: false,
		showDay: false,
		showMonth: true,
		needState: true
	}
	const dprop = {

		showPlan: true,
		showDay: true,
		showMonth: false,
		needState: true
		
	}
	const eprop = {

		showPlan: true,
		showDay: true,
		showMonth: false,
		needState: false
	}



	onLoad(() => {

	})

	const goNext = (prop : any) => {
		let items : string = ''
		// #ifdef H5
		items = encodeURIComponent(JSON.stringify(selectListItem.value));
		// #endif
		// #ifdef MP-QQ||MP-WEIXIN
		items = JSON.stringify(selectListItem.value);
		// #endif
		console.log(items)
		console.log(JSON.stringify(prop))
		uni.navigateTo({
			url: `/pages/calendar/workCalendar?prop=${JSON.stringify(prop)}`
		})
	}
	const clear = () => {
		selectListItem.value = [];
	}
</script>

<style>
	.content {
		padding: 100rpx;
	}

	.children {
		margin: 40rpx;
		padding: 40rpx;
		color: #BBB2B2;
	}

	.color {
		color: #bbb2b2;
	}

	.btn {
		margin: 20px 20px;
		background-color: #54B9CC;
		color: white;
	}
</style>